Omni Default Hq Projection Specular
(omni:default:HQ:PROJECTION:SPECULAR
, 0x2cd645bb2eedc392
)
This template is referenced 1 time by omni:HQ:PROJECTION:SPECULAR.
Technique ambient
Render States
More info can be found on the Direct3D Docs
enum D3DRENDERSTATETYPE {
D3DRS_STENCILENABLE = 1,
D3DRS_STENCILFUNC = 6,
D3DRS_STENCILFAIL = 1,
D3DRS_STENCILMASK = -1,
D3DRS_STENCILPASS = 1,
D3DRS_STENCILREF = 5,
D3DRS_STENCILWRITEMASK = 255,
D3DRS_STENCILZFAIL = 1,
D3DRS_ZENABLE = 1,
D3DRS_ZWRITEENABLE = 0,
D3DRS_ALPHABLENDENABLE = 1,
D3DRS_BLENDOP = 1,
D3DRS_SRCBLEND = 2,
D3DRS_DESTBLEND = 2,
D3DRS_COLORWRITEENABLE = 7,
};
Sampler States
More info can be found on the Direct3D Docs
Sampler 0
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 1,
D3DSAMP_MINFILTER = 1,
D3DSAMP_MIPFILTER = 1,
};
Sampler 1
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 1,
D3DSAMP_MINFILTER = 1,
D3DSAMP_MIPFILTER = 1,
};
Sampler 2
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 1,
D3DSAMP_ADDRESSU = 1,
D3DSAMP_ADDRESSV = 1,
D3DSAMP_MAGFILTER = 3,
D3DSAMP_MINFILTER = 3,
D3DSAMP_MIPFILTER = 3,
};
Sampler 3
enum D3DSAMPLERSTATETYPE {
D3DSAMP_MIPMAPLODBIAS = 827606343,
D3DSAMP_SRGBTEXTURE = 0,
D3DSAMP_ADDRESSU = 3,
D3DSAMP_ADDRESSV = 3,
D3DSAMP_MAGFILTER = 1,
D3DSAMP_MINFILTER = 1,
D3DSAMP_MIPFILTER = 1,
};
Shaders
Vertex Shader
column_major float4x4 camera_inv_view_matrix : register(vs_3_0, c4);
float3 camera_unprojection : register(vs_3_0, c9);
float ref_omni_scale : register(vs_3_0, c7);
float3 render_target_texel_offset : register(vs_3_0, c8);
column_major float4x4 view_proj_matrix : register(vs_3_0, c0);
float3 vp_offset : register(vs_3_0, c10);
float3 vp_size : register(vs_3_0, c11);
struct VertexMain_Output
{
float4 position : POSITION;
float4 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
};
VertexMain_Output VertexMain(float4 position : POSITION)
{
VertexMain_Output o;
float4 temp0, temp1;
float3 temp2;
// def c12, 1, 2, -1, 0.5
// dcl_position v0
// dcl_position o0
// dcl_texcoord o1
// dcl_texcoord1 o2
// mul r0.xyz, c7.x, v0
temp0.xyz = ref_omni_scale.xxx * position.xyz;
// mov r0.w, c12.x
temp0.w = float1(1);
// dp4 r1.x, r0, c0
temp1.x = dot(temp0, (view_proj_matrix._m00_m10_m20_m30));
// dp4 r1.y, r0, c1
temp1.y = dot(temp0, (view_proj_matrix._m01_m11_m21_m31));
// mul r2.xy, r1, c9
temp2.xy = temp1.xy * camera_unprojection.xy;
// dp4 r2.z, r0, c3
temp2.z = dot(temp0, (view_proj_matrix._m03_m13_m23_m33));
// dp4 r1.z, r0, c2
temp1.z = dot(temp0, (view_proj_matrix._m02_m12_m22_m32));
// dp3 o2.x, r2, c4
o.texcoord1.x = dot(temp2.xyz, (camera_inv_view_matrix._m00_m10_m20_m30).xyz);
// dp3 o2.y, r2, c5
o.texcoord1.y = dot(temp2.xyz, (camera_inv_view_matrix._m01_m11_m21_m31).xyz);
// dp3 o2.z, r2, c6
o.texcoord1.z = dot(temp2.xyz, (camera_inv_view_matrix._m02_m12_m22_m32).xyz);
// mov r0.yw, c12
temp0.yw = float2(2, 0.5);
// mov r2.xy, c11
temp2.xy = vp_size.xy;
// mad r0.xy, c10, r0.y, r2
temp0.xy = vp_offset.xy * temp0.yy + temp2.xy;
// add r0.xy, r0, c12.z
temp0.xy = temp0.xy + float2(-1, -1);
// mul r0.xy, r0, r2.z
temp0.xy = temp0.xy * temp2.zz;
// mad r2.x, r1.x, c11.x, r0.x
temp2.x = temp1.x * vp_size.x + temp0.x;
// mad r2.y, r1.y, -c11.y, r0.y
temp2.y = temp1.y * -vp_size.y + temp0.y;
// add r0.xy, r0.w, c8
temp0.xy = temp0.ww + render_target_texel_offset.xy;
// add r0.z, r2.z, r2.z
temp0.z = temp2.z + temp2.z;
// mov r1.w, r2.z
temp1.w = temp2.z;
// mad o1.xy, r0, r0.z, r2
o.texcoord.xy = temp0.xy * temp0.zz + temp2.xy;
// mov o1.w, r0.z
o.texcoord.w = temp0.z;
// mov o0, r1
o.position = temp1;
// mov o2.w, r1.w
o.texcoord1.w = temp1.w;
// mov o1.z, r1.z
o.texcoord.z = temp1.z;
//
return o;
}
Decompiled by DXDecompiler.
Pixel Shader
sampler2D albedo : register(ps_3_0, s3);
column_major float4x4 camera_world_matrix : register(ps_3_0, c0);
sampler2D depth : register(ps_3_0, s1);
sampler2D normal : register(ps_3_0, s0);
float3 ref_light_color : register(ps_3_0, c5);
float ref_light_falloff : register(ps_3_0, c3);
float ref_light_falloff_exponent : register(ps_3_0, c4);
float3 ref_light_position : register(ps_3_0, c6);
samplerCUBE ref_light_texture : register(ps_3_0, s2);
struct PixelMain_Input
{
float4 texcoord : TEXCOORD;
float4 texcoord1 : TEXCOORD1;
};
float4 PixelMain(PixelMain_Input i) : COLOR
{
float4 out_color;
float4 temp0, temp1, temp2, temp3, temp5, temp6, temp7;
float3 temp4;
// def c7, -0.06, 16.666666, 0, -1E-05
// def c8, 1, -0.5, 0.0001, -0.08
// def c9, 590, 10, 0.33, 1
// def c10, 4, 0, 0, 0
// dcl_texcoord v0.xyw
// dcl_texcoord1 v1
// dcl_2d s0
// dcl_2d s1
// dcl_cube s2
// dcl_2d s3
// rcp r0.x, v1.w
temp0.x = 1.0f / i.texcoord1.w;
// mul r0.xyz, r0.x, v1
temp0.xyz = temp0.xxx * i.texcoord1.xyz;
// rcp r0.w, v0.w
temp0.w = 1.0f / i.texcoord.w;
// mul r1.xy, r0.w, v0
temp1.xy = temp0.ww * i.texcoord.xy;
// texld r2, r1, s1
temp2 = tex2D(depth, temp1.xy);
// mov r3.x, c0.w
temp3.x = (camera_world_matrix._m00_m10_m20_m30).w;
// mov r3.y, c1.w
temp3.y = (camera_world_matrix._m01_m11_m21_m31).w;
// mov r3.z, c2.w
temp3.z = (camera_world_matrix._m02_m12_m22_m32).w;
// mad r0.xyz, r0, r2.x, r3
temp0.xyz = temp0.xyz * temp2.xxx + temp3.xyz;
// add r2.xyz, -r0, r3
temp2.xyz = -temp0.xyz + temp3.xyz;
// add r0.xyz, -r0, c6
temp0.xyz = -temp0.xyz + ref_light_position.xyz;
// nrm r3.xyz, r2
temp3.xyz = normalize(temp2.xyz).xyz;
// dp3 r0.w, r0, r0
temp0.w = dot(temp0.xyz, temp0.xyz);
// rsq r0.w, r0.w
temp0.w = 1 / sqrt(temp0.w);
// rcp r0.w, r0.w
temp0.w = 1.0f / temp0.w;
// add r1.z, r0.w, c8.z
temp1.z = temp0.w + float1(0.0001);
// mov r2.x, c8.x
temp2.x = float1(1);
// mad_sat r0.w, r0.w, -c3.x, r2.x
temp0.w = saturate(temp0.w * -ref_light_falloff.x + temp2.x);
// rcp r1.z, r1.z
temp1.z = 1.0f / temp1.z;
// mul r2.yzw, r0.xxyz, r1.z
temp2.yzw = temp0.xyz * temp1.zzz;
// mad_pp r0.xyz, r0, r1.z, r3
temp0.xyz = /* not implemented _pp modifier */ temp0.xyz * temp1.zzz + temp3.xyz;
// nrm_pp r4.xyz, r0
temp4.xyz = /* not implemented _pp modifier */ normalize(temp0.xyz).xyz;
// texld r5, r2.yzww, s2
temp5 = texCUBE(ref_light_texture, temp2.yzw);
// add r0.x, r5.w, c8.w
temp0.x = temp5.w + float1(-0.08);
// add r0.x, -r0.x, r0.w
temp0.x = -temp0.x + temp0.w;
// add r0.y, r0.x, c7.x
temp0.y = temp0.x + float1(-0.06);
// mul r0.x, r0.x, c7.y
temp0.x = temp0.x * float1(16.666666);
// cmp r0.x, r0.y, c8.x, r0.x
temp0.x = (temp0.y >= 0) ? float1(1) : temp0.x;
// max r1.z, r0.x, c7.z
temp1.z = max(temp0.x, float1(0));
// add r0.x, r1.z, c7.w
temp0.x = temp1.z + float1(-1E-05);
// texld r5, r1, s0
temp5 = tex2D(normal, temp1.xy);
// texld r6, r1, s3
temp6 = tex2D(albedo, temp1.xy);
// add r1.xyw, r5.xyzz, c8.y
temp1.xyw = temp5.xyz + float3(-0.5, -0.5, -0.5);
// add r1.xyw, r1, r1
temp1.xyw = temp1.xyw + temp1.xyw;
// dp3_sat r0.y, r2.yzww, r1.xyww
temp0.y = saturate(dot(temp2.yzw, temp1.xyw));
// min r7, r0.x, r0.y
temp7 = min(temp0.x, temp0.y);
// mul r0.x, r1.z, r0.y
temp0.x = temp1.z * temp0.y;
// mul r0.x, r0.w, r0.x
temp0.x = temp0.w * temp0.x;
// texkill r7
clip(temp7);
// dp3 r0.y, r3, r1.xyww
temp0.y = dot(temp3.xyz, temp1.xyw);
// add r0.y, r0.y, r0.y
temp0.y = temp0.y + temp0.y;
// mad r3.xyz, r1.xyww, -r0.y, r3
temp3.xyz = temp1.xyw * -temp0.yyy + temp3.xyz;
// dp3_sat r0.y, r4, r1.xyww
temp0.y = saturate(dot(temp4.xyz, temp1.xyw));
// add r0.z, -r5.w, c8.x
temp0.z = -temp5.w + float1(1);
// mul r0.w, r5.w, r5.w
temp0.w = temp5.w * temp5.w;
// dp2add r0.w, r0.w, r0.x, c7.z
temp0.w = dot(temp0.ww, temp0.xx) + float1(0);
// mul r1, r0.x, c5.xyzz
temp1 = temp0.x * ref_light_color.xyzz;
// mul r3.w, r0.z, c10.x
temp3.w = temp0.z * float1(4);
// texldl r3, r3, s2
temp3 = texCUBElod(ref_light_texture, temp3);
// mul r3, r0.w, r3.xyzz
temp3 = temp0.w * temp3.xyzz;
// mul r3, r3, c5.xyzz
temp3 = temp3 * ref_light_color.xyzz;
// mad r0.x, r6.w, c9.x, c9.y
temp0.x = temp6.w * float1(590) + float1(10);
// pow r2.y, r0.y, r0.x
temp2.y = pow(temp0.y, temp0.x);
// add_sat r0.x, -r2.x, c4.x
temp0.x = saturate(-temp2.x + ref_light_falloff_exponent.x);
// mad r0.x, r0.x, c9.z, c9.w
temp0.x = temp0.x * float1(0.33) + float1(1);
// mul r0.x, r0.x, r2.y
temp0.x = temp0.x * temp2.y;
// mul r0.x, r0.w, r0.x
temp0.x = temp0.w * temp0.x;
// mad r0, c5.xyzz, r0.x, r3
temp0 = ref_light_color.xyzz * temp0.x + temp3;
// mad oC0, r6.xyzz, r1, r0
out_color = temp6.xyzz * temp1 + temp0;
//
return out_color;
}
Decompiled by DXDecompiler.